/**
 * Title :	jFamilyTree generator
 * Description: jFamilyTree generator
 * Version:	provider
 * Copyright (c) 2001-2008
 * Terms of use:see license agreement at http://treebolic.sourceforge.net/en/license.htm
 * Author: Bernard Bou
 * Company: bsys
 */
package jFamilyTree.generator;

import java.awt.Font;
import java.awt.Insets;

import javax.swing.JTextArea;

import jFamilyTree.Messages;

/**
 * Text view
 * @author Bernard Bou
 *
 */
public class TextView extends JTextArea
{
	private static final long serialVersionUID = 1L;

	/**
	 * Constructor
	 */
	public TextView()
	{
		setText(Messages.getString("TextView.0")); //$NON-NLS-1$
		setEditable(false);
		setFont(new Font("SansSerif", Font.PLAIN, 12)); //$NON-NLS-1$
		setLineWrap(false);
		setMargin(new Insets(10, 20, 10, 10));
	}

	/**
	 * Update text view with text
	 * 
	 * @param thisText
	 *        text
	 */
	public void update(String thisText)
	{
		setText(thisText);
		setCaretPosition(0);
	}
}